<html>
<head><meta charset="utf-8"><title>calculate the doc coverage without generating HTMLs · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html">calculate the doc coverage without generating HTMLs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="233635793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233635793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233635793">(Apr 08 2021 at 11:16)</a>:</h4>
<p>I'd like to calculate the doc coverage for each of crates in a large workspace without generating the HTML outputs. ( for the process is really slow , takes more than 1 hours ). After searching the documents I can't find a way to do it. Is there a <code>dry-run</code> mode in the <code>rustdoc</code> ?</p>



<a name="233637428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233637428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233637428">(Apr 08 2021 at 11:35)</a>:</h4>
<p>--generate-coverage on it's own should skip html outputs</p>



<a name="233637434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233637434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233637434">(Apr 08 2021 at 11:35)</a>:</h4>
<p>Can you paste the command you're running?</p>



<a name="233638391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233638391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233638391">(Apr 08 2021 at 11:44)</a>:</h4>
<p><code> RUSTDOCFLAGS="-Z unstable-options --show-coverage" cargo doc --no-deps  --offline  --workspace</code> <br>
Which command should I pass the <code>--generate-coverage</code> flag to ? I can't find it in the help output  neither <code>rustdoc</code> nor <code>cargo doc</code>.<br>
toolchain version: rustdoc 1.52.0-nightly (07194ffcd 2021-02-10)</p>



<a name="233638476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233638476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233638476">(Apr 08 2021 at 11:45)</a>:</h4>
<p>--show-coverage is what I meant</p>



<a name="233638650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233638650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233638650">(Apr 08 2021 at 11:46)</a>:</h4>
<p>yeah that command doesn't generate docs for me</p>
<div class="codehilite"><pre><span></span><code>$ RUSTDOCFLAGS=&quot;-Z unstable-options --show-coverage&quot; cargo +nightly doc --no-deps  --offline  --workspace
    Checking inner v0.1.0 (/home/joshua/src/rust/test-rustdoc/wildcard/inner)
 Documenting wildcard v0.1.0 (/home/joshua/src/rust/test-rustdoc/wildcard)
+-------------------------------------+------------+------------+------------+------------+
| File                                | Documented | Percentage |   Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| src/lib.rs                          |          0 |       0.0% |          0 |       0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total                               |          0 |       0.0% |          0 |       0.0% |
+-------------------------------------+------------+------------+------------+------------+
    Finished dev [unoptimized + debuginfo] target(s) in 1.34s
$ ls doc
ls: cannot access &#39;doc&#39;: No such file or directory
</code></pre></div>



<a name="233638658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233638658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233638658">(Apr 08 2021 at 11:46)</a>:</h4>
<p>why do you think it does?</p>



<a name="233639961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233639961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233639961">(Apr 08 2021 at 11:58)</a>:</h4>
<p>It costs too much time I guess it may spend on generating outputs. <br>
Thank you.</p>



<a name="233639996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233639996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233639996">(Apr 08 2021 at 11:58)</a>:</h4>
<p>you can measure the time with <code>-Z self-profile</code> or <code>-Z time-passes</code></p>



<a name="233713592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233713592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233713592">(Apr 08 2021 at 19:23)</a>:</h4>
<p>btw <span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> what do you think of renaming <code>--show-coverage</code> to <code>--output-format coverage</code>? since it skips generating HTML?</p>



<a name="233713765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233713765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233713765">(Apr 08 2021 at 19:25)</a>:</h4>
<p>I'm fine with it. I'm just afraid it might make it more "tricky" to find. Do you think we can have both to do the same thing or would it overkill?</p>



<a name="233713790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233713790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233713790">(Apr 08 2021 at 19:25)</a>:</h4>
<p>I think we should only have one</p>



<a name="233713803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233713803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233713803">(Apr 08 2021 at 19:25)</a>:</h4>
<p>we can make it warn for a few releases or whatever</p>



<a name="233713989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233713989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233713989">(Apr 08 2021 at 19:26)</a>:</h4>
<p>I don't think warnings are needed, it's a nightly option after all. Let's just maybe write a technical blog post about it (so we can also use it to sum up what the option do).</p>



<a name="233714007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714007">(Apr 08 2021 at 19:26)</a>:</h4>
<p>oh, just thought that it might be an issue</p>



<a name="233714027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714027">(Apr 08 2021 at 19:27)</a>:</h4>
<p><code>--show-coverage</code> has also a json output</p>



<a name="233714045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714045">(Apr 08 2021 at 19:27)</a>:</h4>
<p>by using the <code>--output-format</code> XD</p>



<a name="233714063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714063">(Apr 08 2021 at 19:27)</a>:</h4>
<p>so I don't think it can work</p>



<a name="233714067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714067">(Apr 08 2021 at 19:27)</a>:</h4>
<p>oh oof</p>



<a name="233714099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714099">(Apr 08 2021 at 19:27)</a>:</h4>
<p>We use it on <a href="http://docs.rs">docs.rs</a> ;)</p>



<a name="233714103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714103">(Apr 08 2021 at 19:27)</a>:</h4>
<p>I wonder if we should rename --output-format to --backend or something</p>



<a name="233714197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714197">(Apr 08 2021 at 19:28)</a>:</h4>
<p>Hmmm... Originally it was because we had both json and HTML. The idea remains the same</p>



<a name="233714230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714230">(Apr 08 2021 at 19:28)</a>:</h4>
<p>And it's a stable option, so we can't rename it easily</p>



<a name="233714238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714238">(Apr 08 2021 at 19:28)</a>:</h4>
<p>oh right</p>



<a name="233714241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714241">(Apr 08 2021 at 19:28)</a>:</h4>
<p>oh well</p>



<a name="233714302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714302">(Apr 08 2021 at 19:29)</a>:</h4>
<p>Generally what other tooling does is just have a coverage and coverage-json mode for output-format, which seems not bad.</p>



<a name="233714340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714340">(Apr 08 2021 at 19:29)</a>:</h4>
<p>you mean having two different outputs?</p>



<a name="233714359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714359">(Apr 08 2021 at 19:29)</a>:</h4>
<p>outputs =&gt; options</p>



<a name="233714415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714415">(Apr 08 2021 at 19:30)</a>:</h4>
<p>like <code>--output-format coverage-json</code> and <code>--output-format coverage</code>?</p>



<a name="233714420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714420">(Apr 08 2021 at 19:30)</a>:</h4>
<p>I think <span class="user-mention silent" data-user-id="116122">simulacrum</span> means <code>--output-format coverage</code> and <code>--output-format json-coverage</code></p>



<a name="233714473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714473">(Apr 08 2021 at 19:30)</a>:</h4>
<p>ok so I understood correctly</p>



<a name="233714492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714492">(Apr 08 2021 at 19:30)</a>:</h4>
<p>that could work too</p>



<a name="233714528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714528">(Apr 08 2021 at 19:30)</a>:</h4>
<p>I like the idea, it's more explicit</p>



<a name="233714625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714625">(Apr 08 2021 at 19:31)</a>:</h4>
<p>Since we use it on <a href="http://docs.rs">docs.rs</a>, we'll need a little bit of time before removing the old way (so the warning idea for one release is mandatory here I think)</p>



<a name="233714891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233714891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233714891">(Apr 08 2021 at 19:32)</a>:</h4>
<p>if you mean release=nightly, then yes, but otherwise I'm not sure I understand :)</p>



<a name="233715031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715031">(Apr 08 2021 at 19:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> for <a href="http://docs.rs">docs.rs</a>, we would just need a few days of having both options, so not an issue. I was simply thinking about the end users that might use this option (maybe they exist haha)</p>



<a name="233715176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715176">(Apr 08 2021 at 19:34)</a>:</h4>
<p>Sure. I just wanted to check that my model of <a href="http://docs.rs">docs.rs</a> was accurate.</p>



<a name="233715220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715220">(Apr 08 2021 at 19:34)</a>:</h4>
<p>Unless I'm mistaken, <a href="http://docs.rs">docs.rs</a> updates the nightly daily</p>



<a name="233715233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715233">(Apr 08 2021 at 19:34)</a>:</h4>
<p>so just like you said, not an issue :)</p>



<a name="233715330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715330">(Apr 08 2021 at 19:35)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> Can you open an issue about this please? And I guess you want to do the PR so I'll let you handle that ;)</p>



<a name="233715360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715360">(Apr 08 2021 at 19:35)</a>:</h4>
<p>I can make the update on <a href="http://docs.rs">docs.rs</a> once it's merged and in the nightly we use</p>



<a name="233715367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715367">(Apr 08 2021 at 19:35)</a>:</h4>
<p>sure :)</p>



<a name="233715505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233715505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233715505">(Apr 08 2021 at 19:36)</a>:</h4>
<p>Thanks for bringing this up, it's a really good idea. It simplifies the arguments a lot and I like that :) (and thanks for the suggestion <span class="user-mention" data-user-id="116122">@simulacrum</span> !)</p>



<a name="233720281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233720281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233720281">(Apr 08 2021 at 20:11)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/84012">https://github.com/rust-lang/rust/issues/84012</a></p>



<a name="233720328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233720328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233720328">(Apr 08 2021 at 20:11)</a>:</h4>
<p>(sorry, I took half an hour to argue with friends about how no actually using dynamic linking for rust is hard)</p>



<a name="233728082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233728082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233728082">(Apr 08 2021 at 21:03)</a>:</h4>
<p>I was reading a (bad) book, so it's fine. You can take a few more days :)</p>



<a name="233799362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233799362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233799362">(Apr 09 2021 at 10:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs/near/233639996">said</a>:</p>
<blockquote>
<p>you can measure the time with <code>-Z self-profile</code> or <code>-Z time-passes</code></p>
</blockquote>
<p>It seems that the 'get_blanket_impls' is the most time-consuming one ( costs more than half of total time).Is the process necessary for calc coverage?</p>



<a name="233808285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233808285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233808285">(Apr 09 2021 at 11:57)</a>:</h4>
<p>Ok yeah that's what I expected</p>



<a name="233808403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233808403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233808403">(Apr 09 2021 at 11:58)</a>:</h4>
<p>Hmm it shouldn't be necessary  - I wonder if we can rip the coverage pass out of everything else and just run it as a HIR pass</p>



<a name="233808420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233808420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233808420">(Apr 09 2021 at 11:58)</a>:</h4>
<p>That should be basically instantaneous</p>



<a name="233809642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233809642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233809642">(Apr 09 2021 at 12:09)</a>:</h4>
<p>hmm it looks like running this is intentional? <a href="https://github.com/rust-lang/rust/blob/bc66b92f7f1114a78b98504a927ca9c0aa12c71a/src/librustdoc/passes/mod.rs#L113">https://github.com/rust-lang/rust/blob/bc66b92f7f1114a78b98504a927ca9c0aa12c71a/src/librustdoc/passes/mod.rs#L113</a></p>



<a name="233809895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233809895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233809895">(Apr 09 2021 at 12:11)</a>:</h4>
<p>hmm well removing it doesn't cause the test suite to fail</p>



<a name="233810038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233810038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233810038">(Apr 09 2021 at 12:12)</a>:</h4>
<p>ok so I think what's going on is rustdoc wants to look at <em>inherent</em> and <em>trait</em> impls but not blanket impls <a href="https://github.com/rust-lang/rust/blob/bc66b92f7f1114a78b98504a927ca9c0aa12c71a/src/librustdoc/passes/calculate_doc_coverage.rs#L209-L212">https://github.com/rust-lang/rust/blob/bc66b92f7f1114a78b98504a927ca9c0aa12c71a/src/librustdoc/passes/calculate_doc_coverage.rs#L209-L212</a></p>



<a name="233810083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233810083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233810083">(Apr 09 2021 at 12:13)</a>:</h4>
<p>oh wait what it ignores those too lol <a href="https://github.com/rust-lang/rust/blob/bc66b92f7f1114a78b98504a927ca9c0aa12c71a/src/librustdoc/passes/calculate_doc_coverage.rs#L214-L237">https://github.com/rust-lang/rust/blob/bc66b92f7f1114a78b98504a927ca9c0aa12c71a/src/librustdoc/passes/calculate_doc_coverage.rs#L214-L237</a></p>



<a name="233810279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233810279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233810279">(Apr 09 2021 at 12:15)</a>:</h4>
<p><span class="user-mention" data-user-id="403917">@Siwei</span> could you confirm whether <code>RUSTDOCFLAGS='--no-defaults --passes=strip_hidden,strip_private,calculate_doc_coverage -Z unstable-options --show-coverage' cargo +nightly doc --no-deps  --offline  --workspace</code> is faster?</p>



<a name="233817810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233817810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233817810">(Apr 09 2021 at 13:11)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/84030">https://github.com/rust-lang/rust/pull/84030</a></p>



<a name="233898996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/233898996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nemo157 <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#233898996">(Apr 09 2021 at 22:03)</a>:</h4>
<p><span class="user-mention silent" data-user-id="210316">GuillaumeGomez</span> <a href="#narrow/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs/near/233715220">said</a>:</p>
<blockquote>
<p>Unless I'm mistaken, <a href="http://docs.rs">docs.rs</a> updates the nightly daily</p>
</blockquote>
<p>not quite daily, with how often <code>rustfmt</code> is broken, in fact <a href="https://docs.rs/about/builds">currently we're stuck on <code>rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)</code> still</a></p>



<a name="234006121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234006121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234006121">(Apr 11 2021 at 01:54)</a>:</h4>
<p>Wait, why does <a href="http://docs.rs">docs.rs</a> need <code>rustfmt</code>? Why not only install rustc/rustdoc?</p>



<a name="234006564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234006564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234006564">(Apr 11 2021 at 02:02)</a>:</h4>
<p>some crates depend on it for formatting generated code</p>



<a name="234006622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234006622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234006622">(Apr 11 2021 at 02:03)</a>:</h4>
<p><a href="https://github.com/rust-lang/docs.rs/issues/357">https://github.com/rust-lang/docs.rs/issues/357</a></p>



<a name="234006854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234006854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234006854">(Apr 11 2021 at 02:07)</a>:</h4>
<p>Ah, I see.</p>



<a name="234013388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234013388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234013388">(Apr 11 2021 at 04:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs/near/233810279">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="403917">Siwei</span> could you confirm whether <code>RUSTDOCFLAGS='--no-defaults --passes=strip_hidden,strip_private,calculate_doc_coverage -Z unstable-options --show-coverage' cargo +nightly doc --no-deps  --offline  --workspace</code> is faster?</p>
</blockquote>
<p>This command reduces the total time from more than 10 hours to less than 10 minutes. But it doesn't output anything about the coverage.</p>



<a name="234013533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234013533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234013533">(Apr 11 2021 at 04:10)</a>:</h4>
<p>oh huh, that's odd</p>



<a name="234013554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234013554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234013554">(Apr 11 2021 at 04:11)</a>:</h4>
<p>anyway, <a href="https://github.com/rust-lang/rust/pull/84030">https://github.com/rust-lang/rust/pull/84030</a> should have landed - <span class="user-mention" data-user-id="403917">@Siwei</span>  could you try again with the latest nightly? without the special flags, just the ones from before: <code>RUSTDOCFLAGS='-Z unstable-options --show-coverage' cargo +nightly doc --no-deps  --offline  --workspace</code></p>



<a name="234013579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234013579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234013579">(Apr 11 2021 at 04:11)</a>:</h4>
<p>also 10 minutes <em>without</em> get_blanket_impls ??? what sort of crate are you building?</p>



<a name="234017077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234017077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234017077">(Apr 11 2021 at 05:18)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs/near/234013554">said</a>:</p>
<blockquote>
<p>anyway, <a href="https://github.com/rust-lang/rust/pull/84030">https://github.com/rust-lang/rust/pull/84030</a> should have landed - <span class="user-mention silent" data-user-id="403917">Siwei</span>  could you try again with the latest nightly? without the special flags, just the ones from before: <code>RUSTDOCFLAGS='-Z unstable-options --show-coverage' cargo +nightly doc --no-deps  --offline  --workspace</code></p>
</blockquote>
<p>A dependency fails to compile with the latest nightly toolchain. I'm trying to fix it. Our workspace contains about 120 crates, 12000 pub structs and 160000 pub functions. (counts by <code>rg</code>)</p>



<a name="234019977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234019977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234019977">(Apr 11 2021 at 06:18)</a>:</h4>
<p>With the latest toolchain ( 2021-04-11 ) everything goes well and the total time cost reduces to 9m50s.It's extremely fast!</p>



<a name="234037662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234037662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234037662">(Apr 11 2021 at 11:29)</a>:</h4>
<p>Awesome! Glad I could help :) and wow that is a <em>lot</em> of crates</p>



<a name="234037676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234037676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234037676">(Apr 11 2021 at 11:29)</a>:</h4>
<p>Is your workspace public? It might be useful for working on rustdoc's perf</p>



<a name="234105044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234105044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234105044">(Apr 12 2021 at 05:26)</a>:</h4>
<p>Our projects are private. But maybe I can share some profiling data.</p>



<a name="234120144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234120144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234120144">(Apr 12 2021 at 08:15)</a>:</h4>
<p>You can skip most of the 10 hours by using --no-default-passes and adding back all the passes in <a href="https://github.com/rust-lang/rust/blob/d68f7a2f50958d632ef8dc79212481e4f183ed36/src/librustdoc/passes/mod.rs#L97">https://github.com/rust-lang/rust/blob/d68f7a2f50958d632ef8dc79212481e4f183ed36/src/librustdoc/passes/mod.rs#L97</a> manually with --passes. I already know get_blanket_impls is slow, I don't need to know exactly how slow.</p>



<a name="234781669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234781669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Siwei <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234781669">(Apr 16 2021 at 01:44)</a>:</h4>
<p>Maybe something goes wrong with my laptop the first run (which costs more than 10 hours).<br>
<a href="/user_uploads/4715/_I4uCMdS0HcEoTrm-im8EZX5/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/_I4uCMdS0HcEoTrm-im8EZX5/image.png" title="image.png"><img src="/user_uploads/4715/_I4uCMdS0HcEoTrm-im8EZX5/image.png"></a></div><p>Here're my test results. It seems that I could't make it the same slow when puts everything (collect_trait_impls,STRIP_HIDDEN,STRIP_PRIVATE,CALCULATE_DOC_COVERAGE)  to the <code>--passes</code>.<br>
RUSTDOCFLAGS=' -Z unstable-options --show-coverage' cargo doc --no-deps  255min<br>
--no-defaults  12m55s<br>
--no-defaults --passes collect_trait_impls 14m35s<br>
--no-defaults --passes collect_trait_impls,STRIP_HIDDEN,STRIP_PRIVATE <br>
-no-defaults --passes collect_trait_impls,STRIP_HIDDEN,STRIP_PRIVATE,CALCULATE_DOC_COVERAGE 12m</p>



<a name="234784997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234784997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234784997">(Apr 16 2021 at 02:33)</a>:</h4>
<p>oh sorry, leave out <code>collect_trait_impls</code> from the passes</p>



<a name="234945228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234945228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234945228">(Apr 17 2021 at 01:20)</a>:</h4>
<p>Isn't there a <code>-Z time-passes</code> option or something that will show you the times for each pass?</p>



<a name="234948475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/calculate%20the%20doc%20coverage%20without%20generating%20HTMLs/near/234948475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/calculate.20the.20doc.20coverage.20without.20generating.20HTMLs.html#234948475">(Apr 17 2021 at 01:34)</a>:</h4>
<p>yes, -Z time-passes should work</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>